﻿using System;
using NDBGen.Descriptors.Columns.DataTypes;
using NDBGen.Descriptors.Columns.Tokens;
using NDBGen.Descriptors.Tables.Tokens;

namespace NDBGen.Plugins
{
    public class GeneratorLibraries<TColumnDataTypeSnippetGenerator, TColumnTokenSnippetGenerator, TTableTokenSnippetGenerator>
        where TColumnDataTypeSnippetGenerator : IGenerator<IColumnDataTypeDescriptor>
        where TColumnTokenSnippetGenerator : IGenerator<IColumnTokenDescriptor>
        where TTableTokenSnippetGenerator : IGenerator<ITableTokenDescriptor>
    {
        public GeneratorLibraries()
        {
            this.ColumnDataTypeGenerators = new ExportLibrary<TColumnDataTypeSnippetGenerator, IGeneratorMetadata>(PluginLibraries.Catalog);
            this.ColumnTokenGenerators = new ExportLibrary<TColumnTokenSnippetGenerator, IGeneratorMetadata>(PluginLibraries.Catalog);
            this.TableTokenGenerators = new ExportLibrary<TTableTokenSnippetGenerator, IGeneratorMetadata>(PluginLibraries.Catalog);
        }

        public ExportLibrary<TColumnDataTypeSnippetGenerator, IGeneratorMetadata> ColumnDataTypeGenerators { get; private set; }
        public ExportLibrary<TColumnTokenSnippetGenerator, IGeneratorMetadata> ColumnTokenGenerators { get; private set; }
        public ExportLibrary<TTableTokenSnippetGenerator, IGeneratorMetadata> TableTokenGenerators { get; private set; }
    }
}